-
Notifications
You must be signed in to change notification settings - Fork 917
Add an error-checking wc_curve25519_make_pub() routine to the API for use by Wireguard #3200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…xisting private key, using bare vectors."; rename existing _LOCAL functions wc_curve25519_GetBasePoint() and wc_curve25519() to nxp_ltc_curve25519_GetBasePoint() and nxp_ltc_curve25519() respectively; add const qualifiers opportunistically to existing _LOCAL function curve25519()
… nxp_ltc_curve25519().
dgarske
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent addition! I built against NXP K82 and found a few issues.
…s correct curve25529_bCurveParam) introduced in aadec34.
…_KEYSIZE, not CURVE25519_KEY_SIZE; add static kCurve25519BasePoint at top level
…curve25519_bCurveParam)
dgarske
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Builds correctly for K82 LTC now. Don't have hardware to test on but it does fix an outstanding build error for it.
JacobBarthelmeh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the new function go ahead and add in a test case. This could be to either wolfcrypt/test/test.c or to tests/api.c.
…wc_curve25519(), for clarity and consistency (hat tip to Jacob).
…bs; remove weird extra string-terminating null in test_wolfSSL_sk_CIPHER_description().
…rve25519_make_pub().
…complete the pair. also, add call to fe_init() in the non-NXP codepath of wc_curve25519_make_pub() (note fe_init() is currently a no-op).
dgarske
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Douzzer, this is a great addition.
expose an error-checking wc_curve25519() routine for use by Wireguard, and shuffle some names for clarity.